Skip to content

[Sync to prerelease] Fix reference.ts producing empty hugo.json#1958

Merged
cderv merged 1 commit into
prereleasefrom
sync-1957-to-prerelease
Mar 10, 2026
Merged

[Sync to prerelease] Fix reference.ts producing empty hugo.json#1958
cderv merged 1 commit into
prereleasefrom
sync-1957-to-prerelease

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Description

Sync of #1957 to prerelease.

Original PR

Fix reference.ts producing empty hugo.json

The update-prerelease-reference.yml workflow runs tools/reference.ts to regenerate format reference JSON files. For hugo.qmd, this produces an empty [] because "hugo" is not in pandoc-all — it's a custom Quarto format based on GFM, not a Pandoc built-in.

Fix

Map hugo to its base format gfm for option lookup, so hugo.json gets the correct GFM options. The output filename stays hugo.json. Also add a guard that warns and skips any format with no pandoc-all match, preventing silent empty output for unknown formats.

Upstream fix requested in quarto-dev/quarto-cli#14191 to add hugo-md to pandoc-all as a synthesized format (like dashboard), after which this workaround can be removed.

Fixes #1951

Hugo is a custom Quarto format not in pandoc-all, so
optionsForFormat("hugo") matches no options and writes [].

Map "hugo" to its base format "gfm" for option lookup while
keeping the output filename as hugo.json. Also add a guard
that warns and skips formats with no pandoc-all match.

(cherry picked from commit 3468104)
@cderv
Copy link
Copy Markdown
Member

cderv commented Mar 10, 2026

/deploy-preview

@cderv cderv merged commit 657d3dc into prerelease Mar 10, 2026
@cderv cderv deleted the sync-1957-to-prerelease branch March 10, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant